package com.cl.mapper;

import com.cl.pojo.Department;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DeparmentMapper {
    List<Department> queryAll(@Param("page")int page,@Param("limit")int limit);
    /**
     *
     * @param departmentname
     * @return
     */
    Department queryByDepartmentname(@Param("departmentname")String departmentname);

    // 添加一个部门
    int addDepartment(Department department);

    // 部门名称进行模糊查询
    List<Department> queryByName(String name);

    // 对部门信息进行修改
    int updateDepartment(Department department);

    // 根据id删除
    int delById(int id);
}
